//
//  3DScene.h
//  Ray Tracer
//
//  Created by Kaila, Ashish on 4/15/13.
//  Copyright (c) 2013 Kaila, Ashish. All rights reserved.
//

#ifndef Ray_Tracer__DScene_h
#define Ray_Tracer__DScene_h

void render3DSScene(Raytracer& raytracer,
                    int width,
                    int height,
                    bool enableSpecular)
{
    // Camera parameters.
	Point3D eye(0, 0, 1);
	Vector3D view(0, 0, -1);
	Vector3D up(0, 1, 0);
	double fov = 60;
    
	// Defines a material for shading.
	SolidMaterial gold( Colour(0.3, 0.3, 0.3), Colour(0.75164, 0.60648, 0.22648),
                       Colour(0.628281, 0.555802, 0.366065),
                       51.2,
                       0,
                       0,
                       0);
    
	// Defines a point light source.
	raytracer.addLightSource( new PointLight(Point3D(0, 0, 2),
                                             Colour(0.9, 0.9, 0.9) ),
                             enableSpecular);
    
	// Add a unit square into the scene with material mat.
    CompositeShape* modelShape = ModelFactory::createCompositeShapeFromModel(std::string("teapot.3ds"), &gold);
	SceneDagNode* model = raytracer.addObject(modelShape);
	modelShape->translate(Vector3D(0, 0, -50));
    
	// Render the scene, feel free to make the image smaller for
	// testing purposes.
	raytracer.render(width, height, eye, view, up, fov, "3ds1.bmp");
}

#endif
